package laf.learning;

public class LocalGroundingRule implements GroundingRule {

	private final double learningRate;

	public LocalGroundingRule(double learningRate) {
		this.learningRate = learningRate;
	}

	@Override
	public double decreaseCorrelation(double correlation, long credibility) {
		return (1.0 - learningRate) * correlation;
	}

	@Override
	public double increaseCorrelation(double correlation, long credibility) {
		return (1.0 - learningRate) * correlation + learningRate;
	}

}
